<?php
require_once 'top/TopClient.php';
require_once 'top/RequestCheckUtil.php';
require_once 'top/request/TradeFullinfoGetRequest.php';

$secretKey = trim($_POST['secretKey']);
$appkey = trim($_POST['appkey']);
$sessionKey = trim($_POST['sessionKey']);
$tid = trim($_POST['tid']);
if ($tid) {
	$c = new TopClient;
	$c->appkey = $appkey;
	$c->secretKey = $secretKey;
	$req = new TradeFullinfoGetRequest;
	$req->setFields("orders.logistics_company,orders.invoice_no, consign_time");
	$req->setTid($tid);
	$resp = $c->execute($req, $sessionKey);
	//error_log(date('Y-m-d H:i:s') . "\r\n" . $tid . "\r\n" . $resp . "\r\n", 3, __DIR__ .  '/log/tradeFullinfo_' . date('Y-m-d') . '.txt');
	echo($resp);
}
exit;